package cn.itcast.nems.common.utils;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;

public class WrapperUtil<T> extends LambdaQueryWrapper<T> {
    private static final String LIMIT_LAST_ONE ="order by %s desc limit 1" ;

    public LambdaQueryWrapper<T> limitLaseOne(String field) {
        return this.last(true, String.format(LIMIT_LAST_ONE, field));
    }
}
